.class public Lrexsee/opengl/GLDialog;
.super Lrexsee/core/widget/DivDialog;
.source "GLDialog.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lrexsee/opengl/GLDialog$On3DCanvasPreviewKeyDown;
    }
.end annotation


# instance fields
.field public glSurfaceView:Landroid/opengl/GLSurfaceView;

.field private mOnKeyDown:Lrexsee/opengl/GLDialog$On3DCanvasPreviewKeyDown;


# direct methods
.method public constructor <init>(Lrexsee/core/browser/Browser;Ljava/lang/String;)V
    .locals 1
    .param p1, "browser"    # Lrexsee/core/browser/Browser;
    .param p2, "style"    # Ljava/lang/String;

    .prologue
    const/4 v0, 0x0

    .line 15
    invoke-direct {p0, p1, v0, p2}, Lrexsee/core/widget/DivDialog;-><init>(Lrexsee/core/browser/Browser;Ljava/lang/String;Ljava/lang/String;)V

    .line 11
    iput-object v0, p0, Lrexsee/opengl/GLDialog;->glSurfaceView:Landroid/opengl/GLSurfaceView;

    .line 12
    iput-object v0, p0, Lrexsee/opengl/GLDialog;->mOnKeyDown:Lrexsee/opengl/GLDialog$On3DCanvasPreviewKeyDown;

    .line 16
    return-void
.end method


# virtual methods
.method public final onKeyDown(ILandroid/view/KeyEvent;)Z
    .locals 1
    .param p1, "keyCode"    # I
    .param p2, "event"    # Landroid/view/KeyEvent;

    .prologue
    .line 38
    iget-object v0, p0, Lrexsee/opengl/GLDialog;->mOnKeyDown:Lrexsee/opengl/GLDialog$On3DCanvasPreviewKeyDown;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lrexsee/opengl/GLDialog;->mOnKeyDown:Lrexsee/opengl/GLDialog$On3DCanvasPreviewKeyDown;

    invoke-virtual {v0, p1}, Lrexsee/opengl/GLDialog$On3DCanvasPreviewKeyDown;->run(I)V

    .line 39
    :cond_0
    const/4 v0, 0x1

    return v0
.end method

.method public start(Lrexsee/opengl/GLDialog$On3DCanvasPreviewKeyDown;)V
    .locals 3
    .param p1, "onKeyDown"    # Lrexsee/opengl/GLDialog$On3DCanvasPreviewKeyDown;

    .prologue
    .line 19
    invoke-super {p0}, Lrexsee/core/widget/DivDialog;->start()V

    .line 20
    iput-object p1, p0, Lrexsee/opengl/GLDialog;->mOnKeyDown:Lrexsee/opengl/GLDialog$On3DCanvasPreviewKeyDown;

    .line 21
    new-instance v1, Landroid/opengl/GLSurfaceView;

    iget-object v2, p0, Lrexsee/opengl/GLDialog;->mContext:Landroid/content/Context;

    invoke-direct {v1, v2}, Landroid/opengl/GLSurfaceView;-><init>(Landroid/content/Context;)V

    iput-object v1, p0, Lrexsee/opengl/GLDialog;->glSurfaceView:Landroid/opengl/GLSurfaceView;

    .line 22
    new-instance v0, Lrexsee/opengl/GLRender;

    invoke-direct {v0}, Lrexsee/opengl/GLRender;-><init>()V

    .line 23
    .local v0, "render":Landroid/opengl/GLSurfaceView$Renderer;
    iget-object v1, p0, Lrexsee/opengl/GLDialog;->glSurfaceView:Landroid/opengl/GLSurfaceView;

    invoke-virtual {v1, v0}, Landroid/opengl/GLSurfaceView;->setRenderer(Landroid/opengl/GLSurfaceView$Renderer;)V

    .line 33
    iget-object v1, p0, Lrexsee/opengl/GLDialog;->glSurfaceView:Landroid/opengl/GLSurfaceView;

    invoke-virtual {p0, v1}, Lrexsee/opengl/GLDialog;->addChild(Landroid/view/View;)V

    .line 34
    return-void
.end method
